//
//  JPFMapper.h
//  JPFCore
//
//  Created by JPFei on 2019/3/26.
//  Copyright © 2019 JPF All rights reserved.
//

#import <Foundation/Foundation.h>
#import <objc/runtime.h>

NS_ASSUME_NONNULL_BEGIN

@interface JPFMapper : NSObject

+ (NSDictionary *)propertiesForClass:(Class)cls;
+ (id)populateObject:(id)obj fromDictionary:(NSDictionary*)dic;
+ (id)populateObject:(id)obj fromDictionary:(NSDictionary*)dic exclude:(NSArray*)excludeArray;
+ (id)objectWithClass:(Class)cls fromDictionary:(NSDictionary*)dic;

//对象转字典
+ (NSDictionary*)dictionaryForObject:(id)obj;
+ (NSDictionary*)dictionaryForObject:(id)obj include:(NSArray*)includeArray;
+ (NSMutableDictionary*)mutableDictionaryForObject:(id)obj;
+ (NSMutableDictionary*)mutableDictionaryForObject:(id)obj include:(NSArray*)includeArray;

//对象转数组
+ (NSArray*)arrayOfClass:(Class)cls fromArrayOfDictionary:(NSArray*)array;
+ (NSMutableArray *)mutableArrayOfClass:(Class)cls fromArrayOfDictionary:(NSArray *)array exclude:(NSArray *)excludeArray;
+ (NSMutableArray*)mutableArrayOfClass:(Class)cls fromArrayOfDictionary:(NSArray*)array;

@end

NS_ASSUME_NONNULL_END
